package com.ruoyi.hr.service.impl;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.hr.domain.Education;
import com.ruoyi.hr.domain.Empentryinfo;
import com.ruoyi.hr.mapper.EducationMapper;
import com.ruoyi.hr.mapper.EmpentryinfoMapper;
import com.ruoyi.hr.service.EducationService;
import com.ruoyi.hr.service.EmpentryinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmpentryinfoServiceImpl implements EmpentryinfoService {
    @Autowired
    private EmpentryinfoMapper epentryinfoMapper;

    @DataSource(value = DataSourceType.SLAVE)
    @Override
    public List<Empentryinfo> findAll(int PageNum,int PageSize) {
        return epentryinfoMapper.findAll((PageNum - 1) * PageSize,PageSize);
    }


    @DataSource(value = DataSourceType.SLAVE)
    @Override
    public int findCount() {
        return epentryinfoMapper.findCount();
    }


    @DataSource(value = DataSourceType.SLAVE)
    @Override
    public int insertEmp(Empentryinfo empentryinfo) {
        return epentryinfoMapper.insertEmp(empentryinfo);
    }



}

